package com.yyy.dm.listener.order;

import com.yyy.dm.feign.DMOrderLinkUserFeign;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@RabbitListener(queues = "order_link_user_transaction")
public class OrderLinkUserListener {

    @Resource
    private DMOrderLinkUserFeign dmOrderLinkUserFeign;

    @RabbitHandler
    public void rollbackOrderLinkUser(Long orderId){
        dmOrderLinkUserFeign.rollbackOrderLinkUser(orderId);
    }
}
